﻿using FastORM.Enum;
using FastORM.Realization;
using System;
using System.Collections.Generic;
using System.Text;

namespace FastORM.Handle
{
    public class SqlSessionFactory
    {
        public static SqlSession OpenSession(DataBaseClass DataBaseClass,string ConnectionString)
        {
            SqlSession Session = new SqlSession();
            Session.ConnectionString = ConnectionString;
            switch (DataBaseClass)
            {
                case DataBaseClass.MySql:
                    Session.DBBuild = new MySQLBuild();
                    Session.DBExecute = new MySQLExecute();
                    break;
                case DataBaseClass.SqlServer:
                    break;
            }
            return Session;
        }
    }
}
